#include <stdio.h>

int singlenum(int*nums,int numsSize);

void sort(int*nums,int numsSize) {    //排序
	for(int i=0; i<numsSize; i++) {
		for(int j=numsSize-1; j>i; j--) {
			if(nums[i]>nums[j]) {
				int temp = nums[i];
				nums[i] = nums[j];
				nums[j] = temp;
			}
		}
	}
}

int singlenumber(int*nums,int numsSize) {
	int i=0;
	while(i<numsSize) {
		if(i+1<numsSize&&nums[i]==nums[i+1]){
			i+=2;
		}else{
			return nums[i];
		}
	}
}

int main()
{
	int arr[5];
	int length = sizeof(arr)/sizeof(arr[0]);
	for(int i=0; i<length; i++) {
		scanf("%d",&arr[i]);
	}
	//sort(arr,length);
	printf("%d\n",singlenum(arr,length));
	return 0;
}

int singlenum(int*nums,int numsSize) {  //参考众数找出出现过的数和次数并记录
	int i=0,j=0,num=0,count[5]={0},c[5]={0};
	for(i=0; i<numsSize; i++){
		for(j=0; j<num; j++){
			if(c[j]==nums[i]){
				count[j]++;
				break;
			}
		}
		if(j==num) {
			c[num] = nums[i];
			count[num] = 1;
			num++;
		}
	}
	for(i=0; i<num; i++){
		if(count[i]==1){
			return c[i];
		}
	}
}

int singlenum(int*nums,int numsSize) {  //按位异或
	int result=0;
	for(int i=0; i<numsSize; i++){
		result^=nums[i];
	}
	return result;
}

/*5 5 3 3 1
000^101=101
101^101=000
000^011=011
011^011=000
000^001=001

4 7 3 7 4
0000^0100=0100
0100^0111=0011
0011^0011=0000
0000^0111=0111
0111^0100=0011*/